| Home »
Categories »
Multiple Categories |
Nagios XI - Uploaded plugin returns "/bin/bash^M: bad interpreter: No such file or directory" |
|
Article Number: 474 | Rating: 1/5 from 6 votes | Last Updated by tlea on Tue, Dec 18, 2018 at 5:33 PM
|
Problem Description
After uploading a plugin (check_apc_pdu_load.sh for example), the following error is produced:
The following error message is produced:
-bash: ./check_apc_pdu_load.sh: /bin/bash^M: bad interpreter: No such file or directory
This is caused by the file being in a "Windows" format instead of a "Unix" format. It has to do with the line endings / carriage returns.
Resolving The Problem
To resolve the problem you will convert the file to a Unix format. Execute the following steps from an SSH session as a user with root privileges.
The first step is to install the required package:
RHEL | CentOS | Oracle Linux
yum install -y dos2unix
Debian | Ubuntu
apt-get install -y dos2unix
The next step is to convert the file to a Unix format:
dos2unix /usr/local/nagios/libexec/check_apc_pdu_load.sh
This will output:
dos2unix: converting file /usr/local/nagios/libexec/check_apc_pdu_load.sh to UNIX format ...
After completing these steps the plugin should execute as intended.
Final Thoughts
For any support related questions please visit the Nagios Support Forums at:
http://support.nagios.com/forum/
Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.
Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!
|
|
|
Have a question? Try our Forums! | Give Feedback |
1 (6)
Article Rating (6 Votes)
Rate this article
|
| |
|
Attachments
There are no attachments for this article.
| Related Articles 
SSL Certificate does not validate properly
Viewed 7731 times since Wed, Jan 20, 2021
Nagios Core - Failed to register iobroker
Viewed 9254 times since Wed, Sep 20, 2017
Enabling Oracle Linux Optional Repository
Viewed 21928 times since Mon, May 14, 2018
VMWare checks timing out or slow
Viewed 5795 times since Fri, Feb 11, 2022
Nagios XI - WMI Authentication Problems
Viewed 7614 times since Thu, Feb 25, 2016
Nagios XI - Downloading A System Profile
Viewed 10688 times since Wed, Jul 19, 2017
|
|